@*
* Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0
* See accompanying LICENSE file.
*@
@(crumbs: IndexedSeq[models.navigation.BreadCrumbs.BreadCrumbRendered])

@import models.navigation.BreadCrumbs._

@renderLink(name: String, link: String) = {
<li class="breadcrumb-item"><a href="@link">@name</a></li>
}

@renderText(name: String) = {
<li class="breadcrumb-item">@name</li>
}

@renderActive(name: String) = {
<li class="breadcrumb-item active" aria-current="page">@name</li>
}


<nav aria-label="breadcrumb">
<ol class="breadcrumb">
    @crumbs.map {
        case BCLink(name, link) =>  { @renderLink(name,link) }
        case BCText(name) => { @renderText(name) }
        case BCActive(name) => { @renderActive(name) }
    }
</ol>
</nav>
